﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="房产销冠, 房地产,卡考网络" />
    <meta name="description" content="上海卡考网络有限公司" />
    <title>房产销冠</title>
    <link rel="stylesheet" href="css/list.css" type="text/css" />
    <link rel="stylesheet" href="css/global.css" type="text/css" />
    <link href="bootstrap/iCheck-master/skins/minimal/Orange.css" rel="stylesheet" type="text/css" />
    <!--<script src="js/jquery-1.8.3.min.js"></script>-->
    <!--<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />-->
    <script src="http://dn-blqw.qbox.me/jq+bs+art.js" type="text/javascript"></script>
    <!--<script src="js/jquery.easydropdown.min.js"></script>-->
    <!--<script src="bootstrap/iCheck-master/icheck.js"></script>-->
    <!--<script src="bootstrap/js/bootstrap.min.js"></script>-->
    <!--<script src="js/checkbox.js"></script>-->
    <script src="js/common.js"></script>
    <script src="js/PageIndex.js"></script>
    <script src="http://dn-blqw.qbox.me/kk.js"></script>
</head>
<body style="background: #f1f1f1;">
    <div class="main01">
        <div class="content clearfix">
            <div class="headline02">
                <div class="line_left">推广商品</div>
                <div class="line_right">
                    <ul class="nav_line_right">
                        <li class="con"><a href="#">首页</a></li>
                        <li>/</li>
                        <li class="con"><a href="#">商品管理</a></li>
                        <li>/</li>
                        <li class="con"><a href="#" style="color: #60b12a;">推广商品</a></li>
                    </ul>
                </div>
            </div>
            <div class="bton">
                <!--<div class="bton_left">
                    <div class="bton_left_nav">
                        <select id="F_CateogryKid" class="selall sel100 fl" style="margin-right:11px;">
                            <option value="">商品类型</option>
                        </select>
                        <label class="lab112 fl">
                            <input type="checkbox" id="F_Stock" name="F_Stock" value="" />&nbsp;已售完
					    </label>
                        <div class="fl mr10 fs14">商品标题:</div>
                        <input type="text" class="selall sel100 fl" id="keyWord" name="keyWord" style="margin-right:11px;"/>
                        <input type="button" value="搜索" class="sbtn fl" onclick="f_Seach()" />
                    </div>
                </div>-->
                <div class="bton_right">
                    <div class="bton_left_nav">
                        <a href="product_expand_edit.html" class="btn_add last" target="rightMain">添加推广</a>
                    </div>
                    <div class="bton_left_nav">
                        <!--<a href="#" class="btn_left last"></a>
                        <span class="num">1</span>
                        <span class="num">/</span>
                        <span class="num">3</span>
                        <a href="#" class="btn_right last"></a>-->
                    </div>
                </div>
            </div>
        </div>
        <div style="min-height: 500px;">
            <div style="min-width: 800px; overflow: auto;">
                <table class="table01"  style="width: 100%; max-height: 400px; table-layout: fixed; border-bottom: 1px #e6e6e6 solid;">
                    <thead>
                        <tr class="info_title">
                            <th style="width: 60px;">序号</th>
                            <th style="width: 200px;" class="mid_line"> 图片</th>
                            <th class="mid_line">推广链接</th>
                            <th style="width: 120px" class="mid_line">排序</th>
                            <th style="width: 150px" class="mid_line">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class="info_cont" style="display: none">
                            <td>{F_Index}</td>
                            <td>
                                <div class="con_btn">{F_PicUrl}</div>
                                <div class="con_btn"><span>{F_ShowName}</span></div>
                            </td>
                            <td>{F_ExpandUrl}</td>
                            <td>{F_Sort}</td>
                            <td>
                                <ul class="edit_nav">
                                    <li><a href="product_expand_edit.html?kid={Kid}">编辑</a></li>
                                    <li><a onclick="f_delete({Kid})">删除</a></li>
                                </ul>
                            </td>
                        </tr>
                    </tbody> 
                </table>
            </div>
            <table style="width: 100%; height: auto">
                <tr class="">
                </tr>
            </table>
        </div>
    </div>
    <script type="text/javascript" src="js/list.js"></script>
    <script type="text/javascript">
        //删除
        function f_delete(kid) {
            kk.api.get("/ProductsExpand/Delete", { kids: kid }, function (res) {
                $kk.popup("保存成功", "success", 1500);
                setTimeout(function () { location = location.href;}, 1000);
            });
        }
        //获取推广商品
        function f_GetData(pageIndex) {
            var pageSize = 8;
            var idx = 0;
            newUrlParStr = "?pageSize=" + pageSize + "&pageIndex=" + (pageIndex ? pageIndex : 1);
            kk.api.get("/ProductsExpand/GetList" + newUrlParStr,function(res){
                kk.fillTable(".table01", res.Items, function (data, name) {
                    switch (name) {
                        case "F_Index":
                            idx++;
                            var otherCount = pageSize * (pageIndex - 1);
                            if (isNaN(otherCount)) {
                                otherCount = 0;
                            }
                            return idx + otherCount;
                        case "F_PicUrl":
                            picSelect(data.Thumbs, data.F_PicUrl, 46);
                            return "<img src='" + data[name] + "' alt='' width='46' height='46'/>";
                    }
                });
            });
        }
        $(function () {
            f_GetData();
        });
    </script>
</body>
</html>
